package com.b2b.service.impl.goodsImpl;

import com.b2b.mapper.goodsMapper.GoodsMapper;
import com.b2b.model.entity.goods.Goods;
import com.b2b.service.goodsService.GoodsService;
import com.b2b.service.impl.BaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class GoodsServiceImpl extends BaseServiceImpl<Goods> implements GoodsService {

    @Autowired
    GoodsMapper goodsMapper;

    public List<Goods> selectByCompanyId(Integer companyId){
        return goodsMapper.selectByCompanyId(companyId);
    }

    public List<Goods> selectByShopId(Integer shopId){
        return goodsMapper.selectByShopId(shopId);
    }

    public List<Goods> selectByState(Character state){ return goodsMapper.selectByState(state);}
}
